<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<%@ taglib prefix="sx" uri="/struts-dojo-tags" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<link href="_system/css/common.css" rel="stylesheet" type="text/css" />
<link href="_system/images/skin.css" rel="stylesheet" type="text/css" />
<script type='text/javascript' src='dwr/interface/DWRregionDao.js'></script>
<script type='text/javascript' src='dwr/engine.js'></script>
<script type='text/javascript' src='dwr/util.js'></script>
<script type="text/javascript" src="_system/js/dwr.js"></script>
<script type="text/javascript" src="_system/js/common.js"></script>
<script type="text/javascript" src="_system/js/validation-framework.js" charset="gbk"></script>
<s:head theme="xhtml"/>
<sx:head parseContent="true"/>
<body onload="getProvince()">
	<table width="100%" border="0" cellpadding="0" cellspacing="0">
		<tr>
			<td width="17" height="29" valign="top" background="_system/images/mail_leftbg.gif">
				<img src="_system/images/left-top-right.gif" width="17" height="29" />
			</td>
			<td width="935" height="29" valign="top" background="_system/images/content-bg.gif">
				<table width="100%" height="31" border="0" cellpadding="0"
					cellspacing="0" class="left_topbg" id="table2">
					<tr>
						<td height="31">
							<div class="titlebt">
								住户信息
							</div>
						</td>
					</tr>
				</table>
			</td>
			<td width="16" valign="top" background="_system/images/mail_rightbg.gif">
				<img src="_system/images/nav-right-bg.gif" width="16" height="29" />
			</td>
		</tr>
		<tr>
			<td height="71" valign="middle" background="_system/images/mail_leftbg.gif">
				&nbsp;
			</td>
			<td valign="top" bgcolor="#F7F8F9">
				<table width="100%" height="138" border="0" cellpadding="0"
					cellspacing="0">
					<tr>
						<td height="13" valign="top">
							&nbsp;
						</td>
					</tr>
					<tr>
						<td valign="top">
						<s:form id="tenementForm" name="tenementForm" action="add_tenement" enctype="multipart/form-data" method="post"
							theme="simple" onsubmit="return doValidate('tenementForm');">
							<s:token></s:token>
							<table width="98%" border="0" align="center" cellpadding="0"
								cellspacing="0">
								<tr>
									<td class="left_txt">
										当前位置：新增住户
									</td>
								</tr>
								<tr>
									<td height="20">
										<table width="100%" height="1" border="0" cellpadding="0"
											cellspacing="0" bgcolor="#CCCCCC">
											<tr>
												<td></td>
											</tr>
										</table>
									</td>
								</tr>
								<tr>
									<td>
										<table width="100%" height="55" border="0" cellpadding="0"
											cellspacing="0">
											<tr>
												<td width="10%" height="55" valign="middle">
													<img src="_system/images/title.gif" width="54" height="55">
												</td>
												<td width="90%" valign="top">
													<span class="left_txt2">添加住户!</span>
												</td>
											</tr>
										</table>
									</td>
								</tr>
								<tr>
									<td>
										&nbsp;
									</td>
								</tr>
								<tr>
									<td>
										<table width="100%" height="31" border="0" cellpadding="0"
											cellspacing="0" class="nowtable">
											<tr>
												<td class="left_bt2">
													&nbsp;&nbsp;&nbsp;&nbsp;住户
												</td>
											</tr>
										</table>
									</td>
								</tr>
								<tr>
									<td>
										<table width="100%" border="0" cellspacing="0"
											cellpadding="0">
											<tr>
												<td width="20%" height="30" align="right" bgcolor="#f2f2f2"
													class="left_txt2">
													姓名：
												</td>
												<td width="3%" bgcolor="#f2f2f2">
													&nbsp;
												</td>
												<td width="32%" height="30" bgcolor="#f2f2f2">
													<s:textfield name="tenement.tname" value="%{#tenement.tname}" size="23"></s:textfield>
												</td>
												<td width="45%" height="30" bgcolor="#f2f2f2"
													class="left_txt">
													<s:fielderror cssStyle="color:red">
														<s:param>tenement.tname</s:param>
													</s:fielderror>
												</td>
											</tr>
											<tr>
												<td width="20%" height="30" align="right" bgcolor="#f2f2f2"
													class="left_txt2">
													身份证：
												</td>
												<td width="3%" bgcolor="#f2f2f2">
													&nbsp;
												</td>
												<td width="32%" height="30" bgcolor="#f2f2f2">
													<s:textfield name="tenement.ID" value="%{#tenement.ID}" size="23"></s:textfield>
												</td>
												<td width="45%" height="30" bgcolor="#f2f2f2"
													class="left_txt">
													<s:fielderror cssStyle="color:red">
														<s:param>tenement.ID</s:param>
													</s:fielderror>
												</td>
											</tr>
											<tr>
												<td width="20%" height="30" align="right" bgcolor="#f2f2f2"
													class="left_txt2">
													年龄：
												</td>
												<td width="3%" bgcolor="#f2f2f2">
													&nbsp;
												</td>
												<td width="32%" height="30" bgcolor="#f2f2f2">
													<s:bean var="ageCounter" name="org.apache.struts2.util.Counter" >
														<s:param name="first" value="1"></s:param>
														<s:param name="last" value="120"></s:param>
													</s:bean>
													<s:select name="tenement.age" list="%{#ageCounter}" value="18"></s:select>
												</td>
												<td width="45%" height="30" bgcolor="#f2f2f2"
													class="left_txt">
													<s:fielderror cssStyle="color:red">
														<s:param>tenement.age</s:param>
													</s:fielderror>
												</td>
											</tr>
											<tr>
												<td width="20%" height="30" align="right" bgcolor="#f2f2f2"
													class="left_txt2">
													性别：
												</td>
												<td width="3%" bgcolor="#f2f2f2">
													&nbsp;
												</td>
												<td width="32%" height="30" bgcolor="#f2f2f2">
													<s:radio name="tenement.sex" list="%{#{'m':'男','f':'女'}}"></s:radio>
												</td>
												<td width="45%" height="30" bgcolor="#f2f2f2"
													class="left_txt">
													<s:fielderror cssStyle="color:red">
														<s:param>tenement.sex</s:param>
													</s:fielderror>
												</td>
											</tr>
											<tr>
												<td width="20%" height="30" align="right" bgcolor="#f2f2f2"
													class="left_txt2">
													家乡：
												</td>
												<td width="3%" bgcolor="#f2f2f2">
													&nbsp;
												</td>
												<td width="32%" height="30" bgcolor="#f2f2f2" nowrap="nowrap">
													<s:textfield id="hometown" name="tenement.hometown" size="23"
																value="%{#tenement.hometown}" readonly="true">
													</s:textfield>
												</td>
												<td width="45%" height="30" bgcolor="#f2f2f2"
													class="left_txt">
													<s:fielderror cssStyle="color:red">
														<s:param>tenement.hometown</s:param>
													</s:fielderror>
												</td>
											</tr>
											<tr>
												<td width="20%" height="30" align="right" bgcolor="#f2f2f2"
													class="left_txt2">
												</td>
												<td width="3%" bgcolor="#f2f2f2">
													&nbsp;
												</td>
												<td width="32%" height="30" bgcolor="#f2f2f2" nowrap="nowrap">
													<script type="text/javascript">
														function doSaveHometown(option){
															var obj = document.getElementsByName(option);
															var text = '';
															for(i =0; i < obj.length; i++){
																text += obj[i].options[obj[i].selectedIndex].text;
															}
															document.getElementById('hometown').value = text;
														}
													</script>
													省：<s:select name="hometownSelect" id="province" list="%{#{}}"
															onchange="getCity(this.value)">
														</s:select> 
													市：<s:select name="hometownSelect" id="city" list="%{#{}}"
															onchange="getCounty(this.value)">
														</s:select>
													县：<s:select name="hometownSelect" id="county" list="%{#{}}"
															onchange="doSaveHometown('hometownSelect')">
														</s:select>
												</td>
												<td width="45%" height="30" bgcolor="#f2f2f2"
													class="left_txt">
												</td>
											</tr>
											<tr>
												<td width="20%" height="30" align="right" bgcolor="#f2f2f2"
													class="left_txt2">
													电话：
												</td>
												<td width="3%" bgcolor="#f2f2f2">
													&nbsp;
												</td>
												<td width="32%" height="30" bgcolor="#f2f2f2">
													<s:textfield name="tenement.telephone" value="%{#tenement.telephone}" size="23"></s:textfield>
												</td>
												<td width="45%" height="30" bgcolor="#f2f2f2"
													class="left_txt">
													<s:fielderror cssStyle="color:red">
														<s:param>tenement.telephone</s:param>
													</s:fielderror>
												</td>
											</tr>
											<tr>
												<td width="20%" height="30" align="right" bgcolor="#f2f2f2"
													class="left_txt2">
													手机：
												</td>
												<td width="3%" bgcolor="#f2f2f2">
													&nbsp;
												</td>
												<td width="32%" height="30" bgcolor="#f2f2f2">
													<s:textfield name="tenement.cellphone" value="%{#tenement.cellphone}" size="23"></s:textfield>
												</td>
												<td width="45%" height="30" bgcolor="#f2f2f2"
													class="left_txt">
													<s:fielderror cssStyle="color:red">
														<s:param>tenement.cellphone</s:param>
													</s:fielderror>
												</td>
											</tr>
											<tr>
												<td width="20%" height="30" align="right" bgcolor="#f2f2f2"
													class="left_txt2">
													工作单位：
												</td>
												<td width="3%" bgcolor="#f2f2f2">
													&nbsp;
												</td>
												<td width="32%" height="30" bgcolor="#f2f2f2">
													<s:textfield name="tenement.workUnit" value="%{#tenement.workUnit}" size="23"></s:textfield>
												</td>
												<td width="45%" height="30" bgcolor="#f2f2f2"
													class="left_txt">
													<s:fielderror cssStyle="color:red">
														<s:param>tenement.workUnit</s:param>
													</s:fielderror>
												</td>
											</tr>
											<tr>
												<td width="20%" height="30" align="right" bgcolor="#f2f2f2"
													class="left_txt2">
													交费银行：
												</td>
												<td width="3%" bgcolor="#f2f2f2">
													&nbsp;
												</td>
												<td width="32%" height="30" bgcolor="#f2f2f2">
													<s:textfield name="tenement.bank" value="%{#tenement.bank}" size="23"></s:textfield>
												</td>
												<td width="45%" height="30" bgcolor="#f2f2f2"
													class="left_txt">
													<s:fielderror cssStyle="color:red">
														<s:param>tenement.bank</s:param>
													</s:fielderror>
												</td>
											</tr>
											<tr>
												<td width="20%" height="30" align="right" bgcolor="#f2f2f2"
													class="left_txt2">
													银行帐号：
												</td>
												<td width="3%" bgcolor="#f2f2f2">
													&nbsp;
												</td>
												<td width="32%" height="30" bgcolor="#f2f2f2">
													<s:textfield name="tenement.account" value="%{#tenement.account}" size="23"></s:textfield>
												</td>
												<td width="45%" height="30" bgcolor="#f2f2f2"
													class="left_txt">
													<s:fielderror cssStyle="color:red">
														<s:param>tenement.account</s:param>
													</s:fielderror>
												</td>
											</tr>
											<tr>
												<td width="20%" height="30" align="right" bgcolor="#f2f2f2"
													class="left_txt2">
													购置/入住时间：
												</td>
												<td width="3%" bgcolor="#f2f2f2">
													&nbsp;
												</td>
												<td width="32%" height="30" bgcolor="#f2f2f2">
													<sx:datetimepicker name="tenement.inDate" adjustWeeks="true" weekStartsOn="0"
																		displayFormat="yyyy-MM-dd" value="today">
													</sx:datetimepicker>
												</td>
												<td width="45%" height="30" bgcolor="#f2f2f2"
													class="left_txt">
													<s:fielderror cssStyle="color:red">
														<s:param>tenement.inDate</s:param>
													</s:fielderror>
												</td>
											</tr>
											<tr>
												<td width="20%" height="30" align="right" bgcolor="#f2f2f2"
													class="left_txt2">
													售出/搬出时间：
												</td>
												<td width="3%" bgcolor="#f2f2f2">
													&nbsp;
												</td>
												<td width="32%" height="30" bgcolor="#f2f2f2">
													<sx:datetimepicker name="tenement.outDate" adjustWeeks="true" weekStartsOn="0"
																		displayFormat="yyyy-MM-dd" value="today">
													</sx:datetimepicker>
												</td>
												<td width="45%" height="30" bgcolor="#f2f2f2"
													class="left_txt">
													<s:fielderror cssStyle="color:red">
														<s:param>tenement.outDate</s:param>
													</s:fielderror>
												</td>
											</tr>
											<tr>
												<td width="20%" height="30" align="right" bgcolor="#f2f2f2"
													class="left_txt2">
													&nbsp;
												</td>
												<td width="3%" bgcolor="#f2f2f2">
													&nbsp;
												</td>
												<td width="32%" height="30" bgcolor="#f2f2f2">
													<s:submit value="commit" type="image" src="_system/images/commit.jpg"></s:submit>
													&nbsp;&nbsp;&nbsp;&nbsp;
													<s:submit value="reset" type="image" src="_system/images/reset.jpg" onclick="javascript:document.forms[0].reset(); return false;" ></s:submit>
												</td>
												<td width="45%" height="30" bgcolor="#f2f2f2"
													class="left_txt">
													&nbsp;
												</td>
											</tr>
										</table>
									</td>
								</tr>
							</table>
						</s:form>
						</td>
					</tr>
				</table>
			</td>
			<td background="_system/images/mail_rightbg.gif">
				&nbsp;
			</td>
		</tr>
		<tr>
			<td valign="middle" background="_system/images/mail_leftbg.gif">
				<img src="_system/images/buttom_left2.gif" width="17" height="17" />
			</td>
			<td height="17" valign="top" background="_system/images/buttom_bgs.gif">
				<img src="_system/images/buttom_bgs.gif" width="17" height="17" />
			</td>
			<td background="_system/images/mail_rightbg.gif">
				<img src="_system/images/buttom_right2.gif" width="16" height="17" />
			</td>
		</tr>
	</table>
</body>